Optimal. Leaf size=221 \[ -\frac {a^3 \csc ^2(c+d x)}{2 d}-\frac {3 (a+b) \left (8 a^2+7 a b+b^2\right ) \log (1-\sin (c+d x))}{16 d}+\frac {3 a \left (a^2+b^2\right ) \log (\sin (c+d x))}{d}-\frac {3 (a-b) \left (8 a^2-7 a b+b^2\right ) \log (\sin (c+d x)+1)}{16 d}+\frac {b^2 \sec ^4(c+d x) \left (b \left (\frac {3 a^2}{b^2}+1\right ) \sin (c+d x)+a \left (\frac {a^2}{b^2}+3\right )\right )}{4 d}+\frac {b^2 \sec ^2(c+d x) \left (3 b \left (\frac {7 a^2}{b^2}+1\right ) \sin (c+d x)+4 a \left (\frac {2 a^2}{b^2}+3\right )\right )}{8 d}-\frac {3 a^2 b \csc (c+d x)}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.43, antiderivative size = 221, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 4, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.138, Rules used = {2837, 12, 1805, 1802} \[ -\frac {3 (a+b) \left (8 a^2+7 a b+b^2\right ) \log (1-\sin (c+d x))}{16 d}+\frac {3 a \left (a^2+b^2\right ) \log (\sin (c+d x))}{d}-\frac {3 (a-b) \left (8 a^2-7 a b+b^2\right ) \log (\sin (c+d x)+1)}{16 d}+\frac {b^2 \sec ^4(c+d x) \left (b \left (\frac {3 a^2}{b^2}+1\right ) \sin (c+d x)+a \left (\frac {a^2}{b^2}+3\right )\right )}{4 d}+\frac {b^2 \sec ^2(c+d x) \left (3 b \left (\frac {7 a^2}{b^2}+1\right ) \sin (c+d x)+4 a \left (\frac {2 a^2}{b^2}+3\right )\right )}{8 d}-\frac {3 a^2 b \csc (c+d x)}{d}-\frac {a^3 \csc ^2(c+d x)}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 1802
Rule 1805
Rule 2837
Rubi steps
\begin {align*} \int \csc ^3(c+d x) \sec ^5(c+d x) (a+b \sin (c+d x))^3 \, dx &=\frac {b^5 \operatorname {Subst}\left (\int \frac {b^3 (a+x)^3}{x^3 \left (b^2-x^2\right )^3} \, dx,x,b \sin (c+d x)\right )}{d}\\ &=\frac {b^8 \operatorname {Subst}\left (\int \frac {(a+x)^3}{x^3 \left (b^2-x^2\right )^3} \, dx,x,b \sin (c+d x)\right )}{d}\\ &=\frac {b^2 \sec ^4(c+d x) \left (a \left (3+\frac {a^2}{b^2}\right )+\left (1+\frac {3 a^2}{b^2}\right ) b \sin (c+d x)\right )}{4 d}-\frac {b^6 \operatorname {Subst}\left (\int \frac {-4 a^3-12 a^2 x-4 a \left (3+\frac {a^2}{b^2}\right ) x^2-3 \left (1+\frac {3 a^2}{b^2}\right ) x^3}{x^3 \left (b^2-x^2\right )^2} \, dx,x,b \sin (c+d x)\right )}{4 d}\\ &=\frac {b^2 \sec ^4(c+d x) \left (a \left (3+\frac {a^2}{b^2}\right )+\left (1+\frac {3 a^2}{b^2}\right ) b \sin (c+d x)\right )}{4 d}+\frac {b^2 \sec ^2(c+d x) \left (4 a \left (3+\frac {2 a^2}{b^2}\right )+3 \left (1+\frac {7 a^2}{b^2}\right ) b \sin (c+d x)\right )}{8 d}+\frac {b^4 \operatorname {Subst}\left (\int \frac {8 a^3+24 a^2 x+8 a \left (3+\frac {2 a^2}{b^2}\right ) x^2+3 \left (1+\frac {7 a^2}{b^2}\right ) x^3}{x^3 \left (b^2-x^2\right )} \, dx,x,b \sin (c+d x)\right )}{8 d}\\ &=\frac {b^2 \sec ^4(c+d x) \left (a \left (3+\frac {a^2}{b^2}\right )+\left (1+\frac {3 a^2}{b^2}\right ) b \sin (c+d x)\right )}{4 d}+\frac {b^2 \sec ^2(c+d x) \left (4 a \left (3+\frac {2 a^2}{b^2}\right )+3 \left (1+\frac {7 a^2}{b^2}\right ) b \sin (c+d x)\right )}{8 d}+\frac {b^4 \operatorname {Subst}\left (\int \left (\frac {3 (a+b) \left (8 a^2+7 a b+b^2\right )}{2 b^4 (b-x)}+\frac {8 a^3}{b^2 x^3}+\frac {24 a^2}{b^2 x^2}+\frac {24 a \left (a^2+b^2\right )}{b^4 x}+\frac {3 (a-b) \left (-8 a^2+7 a b-b^2\right )}{2 b^4 (b+x)}\right ) \, dx,x,b \sin (c+d x)\right )}{8 d}\\ &=-\frac {3 a^2 b \csc (c+d x)}{d}-\frac {a^3 \csc ^2(c+d x)}{2 d}-\frac {3 (a+b) \left (8 a^2+7 a b+b^2\right ) \log (1-\sin (c+d x))}{16 d}+\frac {3 a \left (a^2+b^2\right ) \log (\sin (c+d x))}{d}-\frac {3 (a-b) \left (8 a^2-7 a b+b^2\right ) \log (1+\sin (c+d x))}{16 d}+\frac {b^2 \sec ^4(c+d x) \left (a \left (3+\frac {a^2}{b^2}\right )+\left (1+\frac {3 a^2}{b^2}\right ) b \sin (c+d x)\right )}{4 d}+\frac {b^2 \sec ^2(c+d x) \left (4 a \left (3+\frac {2 a^2}{b^2}\right )+3 \left (1+\frac {7 a^2}{b^2}\right ) b \sin (c+d x)\right )}{8 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 3.10, size = 190, normalized size = 0.86 \[ \frac {-8 a^3 \csc ^2(c+d x)+48 a \left (a^2+b^2\right ) \log (\sin (c+d x))-3 (a+b) \left (8 a^2+7 a b+b^2\right ) \log (1-\sin (c+d x))-3 (a-b) \left (8 a^2-7 a b+b^2\right ) \log (\sin (c+d x)+1)-48 a^2 b \csc (c+d x)-\frac {3 (a+b)^2 (3 a+b)}{\sin (c+d x)-1}+\frac {3 (a-b)^2 (3 a-b)}{\sin (c+d x)+1}+\frac {(a+b)^3}{(\sin (c+d x)-1)^2}+\frac {(a-b)^3}{(\sin (c+d x)+1)^2}}{16 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.48, size = 337, normalized size = 1.52 \[ \frac {24 \, {\left (a^{3} + a b^{2}\right )} \cos \left (d x + c\right )^{4} - 4 \, a^{3} - 12 \, a b^{2} - 12 \, {\left (a^{3} + a b^{2}\right )} \cos \left (d x + c\right )^{2} + 48 \, {\left ({\left (a^{3} + a b^{2}\right )} \cos \left (d x + c\right )^{6} - {\left (a^{3} + a b^{2}\right )} \cos \left (d x + c\right )^{4}\right )} \log \left (\frac {1}{2} \, \sin \left (d x + c\right )\right ) - 3 \, {\left ({\left (8 \, a^{3} - 15 \, a^{2} b + 8 \, a b^{2} - b^{3}\right )} \cos \left (d x + c\right )^{6} - {\left (8 \, a^{3} - 15 \, a^{2} b + 8 \, a b^{2} - b^{3}\right )} \cos \left (d x + c\right )^{4}\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, {\left ({\left (8 \, a^{3} + 15 \, a^{2} b + 8 \, a b^{2} + b^{3}\right )} \cos \left (d x + c\right )^{6} - {\left (8 \, a^{3} + 15 \, a^{2} b + 8 \, a b^{2} + b^{3}\right )} \cos \left (d x + c\right )^{4}\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (3 \, {\left (15 \, a^{2} b + b^{3}\right )} \cos \left (d x + c\right )^{4} - 6 \, a^{2} b - 2 \, b^{3} - {\left (15 \, a^{2} b + b^{3}\right )} \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )}{16 \, {\left (d \cos \left (d x + c\right )^{6} - d \cos \left (d x + c\right )^{4}\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.35, size = 240, normalized size = 1.09 \[ -\frac {3 \, {\left (8 \, a^{3} - 15 \, a^{2} b + 8 \, a b^{2} - b^{3}\right )} \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right ) + 3 \, {\left (8 \, a^{3} + 15 \, a^{2} b + 8 \, a b^{2} + b^{3}\right )} \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right ) - 48 \, {\left (a^{3} + a b^{2}\right )} \log \left ({\left | \sin \left (d x + c\right ) \right |}\right ) + \frac {2 \, {\left (45 \, a^{2} b \sin \left (d x + c\right )^{5} + 3 \, b^{3} \sin \left (d x + c\right )^{5} + 12 \, a^{3} \sin \left (d x + c\right )^{4} + 12 \, a b^{2} \sin \left (d x + c\right )^{4} - 75 \, a^{2} b \sin \left (d x + c\right )^{3} - 5 \, b^{3} \sin \left (d x + c\right )^{3} - 18 \, a^{3} \sin \left (d x + c\right )^{2} - 18 \, a b^{2} \sin \left (d x + c\right )^{2} + 24 \, a^{2} b \sin \left (d x + c\right ) + 4 \, a^{3}\right )}}{{\left (\sin \left (d x + c\right )^{3} - \sin \left (d x + c\right )\right )}^{2}}}{16 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.74, size = 285, normalized size = 1.29 \[ \frac {a^{3}}{4 d \sin \left (d x +c \right )^{2} \cos \left (d x +c \right )^{4}}+\frac {3 a^{3}}{4 d \sin \left (d x +c \right )^{2} \cos \left (d x +c \right )^{2}}-\frac {3 a^{3}}{2 d \sin \left (d x +c \right )^{2}}+\frac {3 a^{3} \ln \left (\tan \left (d x +c \right )\right )}{d}+\frac {3 a^{2} b}{4 d \sin \left (d x +c \right ) \cos \left (d x +c \right )^{4}}+\frac {15 a^{2} b}{8 d \sin \left (d x +c \right ) \cos \left (d x +c \right )^{2}}-\frac {45 a^{2} b}{8 d \sin \left (d x +c \right )}+\frac {45 a^{2} b \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8 d}+\frac {3 a \,b^{2}}{4 d \cos \left (d x +c \right )^{4}}+\frac {3 a \,b^{2}}{2 d \cos \left (d x +c \right )^{2}}+\frac {3 a \,b^{2} \ln \left (\tan \left (d x +c \right )\right )}{d}+\frac {b^{3} \tan \left (d x +c \right ) \left (\sec ^{3}\left (d x +c \right )\right )}{4 d}+\frac {3 b^{3} \tan \left (d x +c \right ) \sec \left (d x +c \right )}{8 d}+\frac {3 b^{3} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8 d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.34, size = 217, normalized size = 0.98 \[ -\frac {3 \, {\left (8 \, a^{3} - 15 \, a^{2} b + 8 \, a b^{2} - b^{3}\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, {\left (8 \, a^{3} + 15 \, a^{2} b + 8 \, a b^{2} + b^{3}\right )} \log \left (\sin \left (d x + c\right ) - 1\right ) - 48 \, {\left (a^{3} + a b^{2}\right )} \log \left (\sin \left (d x + c\right )\right ) + \frac {2 \, {\left (3 \, {\left (15 \, a^{2} b + b^{3}\right )} \sin \left (d x + c\right )^{5} + 12 \, {\left (a^{3} + a b^{2}\right )} \sin \left (d x + c\right )^{4} + 24 \, a^{2} b \sin \left (d x + c\right ) - 5 \, {\left (15 \, a^{2} b + b^{3}\right )} \sin \left (d x + c\right )^{3} + 4 \, a^{3} - 18 \, {\left (a^{3} + a b^{2}\right )} \sin \left (d x + c\right )^{2}\right )}}{\sin \left (d x + c\right )^{6} - 2 \, \sin \left (d x + c\right )^{4} + \sin \left (d x + c\right )^{2}}}{16 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 11.95, size = 221, normalized size = 1.00 \[ \frac {3\,a\,\ln \left (\sin \left (c+d\,x\right )\right )\,\left (a^2+b^2\right )}{d}-\frac {{\sin \left (c+d\,x\right )}^4\,\left (\frac {3\,a^3}{2}+\frac {3\,a\,b^2}{2}\right )-{\sin \left (c+d\,x\right )}^2\,\left (\frac {9\,a^3}{4}+\frac {9\,a\,b^2}{4}\right )+{\sin \left (c+d\,x\right )}^5\,\left (\frac {45\,a^2\,b}{8}+\frac {3\,b^3}{8}\right )-{\sin \left (c+d\,x\right )}^3\,\left (\frac {75\,a^2\,b}{8}+\frac {5\,b^3}{8}\right )+\frac {a^3}{2}+3\,a^2\,b\,\sin \left (c+d\,x\right )}{d\,\left ({\sin \left (c+d\,x\right )}^6-2\,{\sin \left (c+d\,x\right )}^4+{\sin \left (c+d\,x\right )}^2\right )}-\frac {3\,\ln \left (\sin \left (c+d\,x\right )+1\right )\,\left (a-b\right )\,\left (8\,a^2-7\,a\,b+b^2\right )}{16\,d}-\frac {3\,\ln \left (\sin \left (c+d\,x\right )-1\right )\,\left (a+b\right )\,\left (8\,a^2+7\,a\,b+b^2\right )}{16\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________